<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>赚钱吧-苹果试玩平台</title>
    <script src="https://ksc.cdn.tj.asm8.com/WeChatMinApp%2Ftry_play%2FAndroid%2Fgeneralize%2Fflexible.js"></script>
</head>
<body>
    <div style="width: 100%; height:50%; background: #43a8e9;"></div>

    <div class="upscroll_wrap">
        <ul class="_container" id="upscroll">
            <li><img src="https://zhuanqianba.oss-cn-qingdao.aliyuncs.com/loadpic/1.png" alt="" ></a></li>
            <li><img src="https://zhuanqianba.oss-cn-qingdao.aliyuncs.com/loadpic/2.png" alt="" ></a></li>
            <li><img src="https://zhuanqianba.oss-cn-qingdao.aliyuncs.com/loadpic/3.png" alt="" ></a></li>
            <li><img src="https://zhuanqianba.oss-cn-qingdao.aliyuncs.com/loadpic/4.png" alt=""  ></a></li>
            <li><img src="https://zhuanqianba.oss-cn-qingdao.aliyuncs.com/loadpic/5.png" alt="" ></a></li>
        </ul>
    </div>
    <div class="content_wrap">
        <img class="content_bg" src="https://ksc.cdn.tj.asm8.com/WeChatMinApp%2Ftry_play%2FAndroid%2Fgeneralize%2Fcontent_bg.png" alt="">

        <div class="btn" onclick="onBtn()"></div>
    </div>

    <div style="width: 100%; height:50%; background: #f0f9ff;"></div>


    <div id="modal-mask" class="modal-mask modal-mask-wx-lo" style="display: none;" onclick="coloseModal()">
        <img class="wx-lo-tip" src="https://ksc.cdn.tj.asm8.com/WeChatMinApp%2Ftry_play%2FAndroid%2Fgeneralize%2Flo_ios.png" alt="">
    </div>
</body>

<style>
    body{
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        /*position: fixed;*/
        bottom: 0;
    }

    .content_wrap{
        width: 100%;
        height: 12.106666rem;
        position:absolute;
        z-index: 1000;
        margin:auto;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;

        display: flex;
        flex-direction: column;
        align-items: center;

    }

    .content_bg{
        width: 100%;
        height: 12.106666rem;
        position: absolute;
    }

    .btn{
        width: 3.2658rem;
        height: 1.0666rem;
        /*background: greenyellow;*/
        position: absolute;
        bottom: 1.8rem;
    }

    .upscroll_wrap{
        /*width: 100%;*/
        position: absolute;
        top: 0.5rem;
        z-index: 1001;
        background: #92c7ea;
        padding-bottom: 0.05rem;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
        border-radius: 360rem;
    }




    /* 滚动部分CSS Start */
    ._container {
        height: 0.8rem;
        overflow: hidden;
        /*border-bottom: 1px solid #000;*/
        text-align: center;
    }
    ._container li {
        height: 0.8rem;
        line-height: 0.8rem;
    }
    ._container li:first-child {
        margin-top: 0px;
        transition: margin-top .8s;/*此处可修改每次滚动持续时间*/
    }

    ._container li img{
        height: 0.8rem;
    }
    /* 滚动部分CSS End */



    .modal-mask {
        width: 100vw;
        height: 100vh;
        position:fixed;
        top:0;
        left:0;
        right:0;
        background-color: rgba(0,0,0,0.8);;
        overflow: hidden;
        z-index: 9000;
        color: #fff;
    }

    .wx-lo-tip{
        width: 6.5rem;
        position: absolute;
        right: 0.2rem;
    }
</style>

<script>
    function onBtn(){
        if(is_weixn()){
            var modal = document.getElementById('modal-mask');
            modal.style.display = 'block';
        }else{
            var param = getParam()
            var url = "http://zhuanqianba.cn/#/?invitecode="+param.invite_code
            window.location.href = url
        }
    }

    function coloseModal() {
        var modal = document.getElementById('modal-mask');
        modal.style.display = 'none';
    }

    function is_weixn(){
        var ua = navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i)=="micromessenger") {
            return true;
        } else {
            return false;
        }
    }

    function getParam() {
        var url = location.search; //获取url中"?"符后的字串
        console.log("url",url)
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
            var str = url.substr(1);
            strs = str.split("&");
            for(var i = 0; i < strs.length; i ++) {
                theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
            }
        }
        return theRequest;
    }


    function Scroll(){}

    Scroll.prototype.upScroll=function(dom,_h,interval){
        var dom=document.getElementById(dom);
        var timer=setTimeout(function(){
            var _field=dom.firstElementChild;
            _field.style.marginTop=_h;
            clearTimeout(timer);
        },1000)
        setInterval(function(){
            var _field=dom.firstElementChild;
            _field.style.marginTop="0px";
            dom.appendChild(_field);
            var _field=dom.firstElementChild
            _field.style.marginTop=_h;
        },interval)
    }

    let myScroll=new Scroll();

    myScroll.upScroll("upscroll","-0.8rem",3000);

</script>

</html>
